import { createSlice } from '@reduxjs/toolkit'

export const citySlice = createSlice({
  name: 'citySlice',
  initialState: {
    start:"北京",
    end:"广州"
  },
  reducers: {
    cityList(state,{payload}){
       state[payload.type]=payload.city
    }
  },
})

// Action creators are generated for each case reducer function
export const { cityList } = citySlice.actions

export default citySlice.reducer